#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Copyright [Gtlions Lai].
# Create Date:
# Update Date:
"""summarization ahout this script.

detail ahout this script

   Class(): summarization about Class
   ...
   function(): summarization about function
   ...
"""
__authors__ = '"Gtlions Lai" <gtlions.l@qq.com>'

import sys
from PyQt4 import QtGui, QtCore


class Main(QtGui.QWidget):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self)
        self.setWindowTitle('QWidget')
        self.setGeometry(300, 300, 300, 300)
        self.grid = QtGui.QGridLayout()
        self.MyTable = QtGui.QTableWidget(4,3)
        self.MyTable.setHorizontalHeaderLabels([u'姓名',u'身高',u'体重'])

        newItem = QtGui.QTableWidgetItem("松鼠")
        self.MyTable.setItem(0, 0, newItem)

        newItem = QtGui.QTableWidgetItem("10cm")
        self.MyTable.setItem(0, 1, newItem)

        newItem = QtGui.QTableWidgetItem("60g")
        self.MyTable.setItem(0, 2, newItem)

        self.grid.addWidget(self.MyTable)
        self.setLayout(self.grid)
if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)
    main = Main()
    main.show()
    sys.exit(app.exec_())